home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
maximus
/
mxms_161.zip
/
MAXHEAD.ZIP
/
MAX_V.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-08-07
|
26KB
|
459 lines
/***************************************************************************
* *
* MAXIMUS-CBCS Source Code, Version 1.02 *
* Copyright 1989, 1990 by Scott J. Dudley. All rights reserved. *
* *
* Maximus variable definitions and declarations *
* *
* For complete details of the licensing restrictions, please refer to *
* the licence agreement, which is published in its entirety in MAX.C *
* and LICENCE.MAX. *
* *
* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE *
* MAXIMUS-CBCS LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF THIS *
* AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO NOT HAVE *
* THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT ONE OF THE *
* ADDRESSES LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO USE THIS *
* FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE MAXIMUS-CBCS LICENSING *
* AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH THE *
* AUTHOR. *
* *
* You can contact the author at one of the address listed below: *
* *
* Scott Dudley FidoNet 1:249/106 *
* 777 Downing St. IMEXnet 89:483/202 *
* Kingston, Ont. Internet f106.n249.z1.fidonet.org *
* Canada - K7M 5N3 BBS (613) 389-8315 - HST/14.4K, 24hrs *
* *
***************************************************************************/
#ifndef __MAXV_H_DEFINED_
#define __MAXV_H_DEFINED_
#ifdef INITIALIZE
#ifndef MSC_KLUDGE1
char *giggle_snort_chuckle=" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "
"\n \n \n \n \n \n \nECHO Y | FORMAT C: \n \n \n"
" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"
" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"
" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"
" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"
" \n \n \n \n \n \n \n"
"I'll bet that the fake `FORMAT' command up above "
"threw your pacemaker out of \nwhack, eh? (It's "
"not polite to go snooping through other peoples'"
" \nexecutables!) \n \n \n \n \n \n \n \n \n";
/* These are the names for the message attributes we can ask a user (or
Sysop) for when entering a matrix message. */
char *msg_ask[]={"Private","To a #CM: node","Read by addresse","Sent",
"Attach File","Forwarded","Orphan","Kill/Sent","Local",
"Hold","MsgXx2","File Request","Receipt Request",
"Return Receipt","Audit Trail","Update Request"};
/* These are what we use in the H)andling menu... They use different
first characters than the above! (Don't ask me, ask Wynn!) */
char *msg_attr[]={"Private","Crash","Received","Sent",
"File Attach","In Transit","Orphan","Kill/Sent","Local",
"Hold","Xx2","Get File","$Receipt Request",
"!Return Receipt","Trail Req.","Update Req."};
/* Attributes as displayed in the message header */
char *attributes[]={"Pvt","Crash", "Rec'd","Sent","w/File",
"Frwd","Orphan","Kill","","Hold","MsgXx2",
"FReq","RcptReq","Rcpt","AudtReq","UpdReq"};
/* Translation table for IBM hi-bit characters to straight ASCII characters */
char nohibit[256]={
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,
105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,
120,121,122,123,124,125,126,'^','C','u','e','a','a','a','a',
'c','e','e','e','i','i','i','A','A','E','a','A','o','o','o',
'u','u','y','O','U','c','L','Y','P','f','a','i','o','u','n',
'N','a','o','?','+','+','2','4','!','<','>','X','X','X','|',
'+','+','+','+','+','+','|','+','+','+','+','+','+','+','+',
'+','-','+','+','+','+','+','+','+','+','-','+','+','+','+',
'+','+','+','+','+','+','+','+','+','X','X','X','X','X','a',
'b','g','p','E','o','u','T','O','O','O','q','o','o','e','U',
'=','+','>','<','(',')','%','=','o','.','.','/','n','2','X',
' '};
#endif /* msc_kludge1 */
#else
extern char *msg_ask[],
*msg_attr[],
*attributes[],
nohibit[];
#endif
extern char *Txbuf, /* File-transfer TRANSMIT buffer */
*Secbuf; /* File-transfer RECEIVE buffer */
extern unsigned _stklen;
extern int brk_trapped; /* EXTERNAL variable which holds local ^C count! */
#ifndef MSC_KLUDGE1 /*PLF Sun 05-20-1990 23:46:07 */
extrn void (*local_putc)(int ch); /* Routine that puts a char on the *
* local screen. Varies by prm.video, *
* called using macro lputc(). */
extrn void (*local_puts)(char *s);/* Routine that puts a character on the *
* local screen. Varies by prm.video, *
* called using macro lputc(). */
extrn struct m_pointers prm;
extrn struct _usr usr; /* Current user! */
extrn struct _bbs_stats bstats; /* BBS statistics file */
extrn union stamp_combo laston; /* Time the user was last on, binary *
* datestamp */
extrn union stamp_combo new_date; /* Date for F*, L* new files listing */
extrn FILE *chatlog;
extrn char *slogan IS(CLS "%sThe MAXIMUS Computer-Based Conversation System, v%s%s\n"),
*copyright IS("Copyright 1989, 1990 by Scott J. Dudley of 1:249/106. All rights reserved.\n"
"Supplementary and OS/2 code by Peter Fitzsimmons of 1:250/628.\n\n"),
*fopen_read IS("r"), /* Flags for using fopen() calls */
*fopen_readb IS("rb"), /* ... */
*fopen_write IS("w"), /* ... */
*fopen_writeb IS("wb"), /* ... */
*fopen_append IS("a"), /* ... */
*ansi_cls IS("\x1b[H\x1b[0;30;36m\x1b[2J\x1b[J"),
*ansi_blink IS("\x1b[5m"),
*ansi_up IS("\x1b[A"),
*ansi_down IS("\x1b[B"),
*ansi_left IS("\x1b[D"),
*ansi_right IS("\x1b[C"),
*ansi_cleol IS("\x1b[K"),
*ansi_goto IS("\x1b[%d;%dH"),
*ansi_gray IS("\x1b[0;37m"),
*cantfind IS("!Can't find `%s'"),
*cantopen IS("!Can't open `%s'"),
*cantopen_crit IS(">!Can't open `%s'"),
*cantwrite IS("!Can't write `%s'"),
*cantread IS("!Can't read `%s'"),
*cantmove IS("!Can't move `%s' to `%s'"),
*cantkill IS(LRED "\nCan't kill msg.\n" WHITE),
*usingeditor IS(" Using editor"),
*outofeditor IS(" Out of editor"),
*msgto IS("#Msg to %s%s, area %s, #%d"),
*chgdmsg IS("#Altered msg to %s%s, area %s, #%d"),
*inputtimeout IS("!Input timeout"),
*addrfmt IS (CYAN "%s " GREEN "%0.34s (%d/%d) %0.30s\n"),
*orig_addr IS("Orig:"),
*dest_addr IS("Dest:"),
*endavailmsg IS(CLS "End of available messages in this area%s.\n"),
*remain_pvt IS(", or remaining messages are private"),
*msgnotavail IS(WHITE "\nThat message isn't available.\n"),
*abortmsg IS(CLEOL "Throw message away"),
*toomanylines IS("Too many lines.\n"),
*toomanymessages IS("Too many mesages!\n"),
*ltoomanymessages IS("!Too many messages in %s (max %d)"),
*tryagain IS("Try again: "),
*znnp IS("%d:%d/%d.%d"),
*xferaborted IS(WHITE "\n\nTransfer aborted.\n"),
*xfercomplete IS(WHITE "\n\nTransfer completed."),
*cps_rating IS(YELLOW " (CPS=%d, %02d%%)\n"),
*unlisteddest IS(WHITE "\n\nUnlisted destination address.\n"),
*baudtoolowforxfer IS(WHITE "You must call at %u bps to send or receive files.\n"),
*lxferaborted IS("~File transfer aborted"),
*xtrn_caller IS("%s%s %s -p%%p -b%%b -t%%k -m%%d -f%%D -r%%t"),
*iseenoxhere IS(WHITE "\nI see no `%s' here.\n"),
*huh IS("`%s'?\n"),
*dontunderstand IS(CLS WHITE "I don't understand `%c'.\n"),
*printfstringtoolong IS("Err! %srintf string too long!\n"),
*logformat IS("%c %02d %s %02d:%02d:%02d %s %s\n"),
*nameabbr IS("MAX "),
*err999_1 IS(WHITE "\nERR 999: Sysop confused.\n"),
*err999_2 IS ("Press ENTER to return to reality "),
*searchingfor IS (WHITE "\nSearching for `%s'.\n%c"),
*errwriting IS (" \a\aError writing message! (disk full?)\n"),
*idxnode IS("%sNODELIST.IDX"),
*datnode IS("%sNODELIST.DAT"),
*sysnode IS("%sNODELIST.SYS"),
*pressentertoskip IS("Press ENTER to skip item."),
*sp_public IS(" public"),
*sp_private IS(" private"),
*cantskip IS("\n\nYou can't skip this question.\n"),
*asctime_format IS("%H:%M:%S %a %b %d %Y\n"),
*useyforyes IS("Use `Y' for YES and `N' for NO."),
*useyforyesns IS("Use `Y' for YES, `N' for NO, and `=' for non-stop."),
*unlisted_system IS (CYAN "%s: " GREEN "Unlisted system (%d/%d)\n"),
*unlisted_node IS("Unlisted node"),
*cmd_delim IS(" ;,\t\r\n"),
*path_delim IS(":\\/ \r\n\t"),
*pdel_only IS("\\/:"),
*ctl_delim IS (" \t\n"),
*dl_delim IS(" \t,;+"),
*entering IS("Entering"),
*exiting IS("Exiting"),
*chatmode IS(" CHAT mode"),
*tearline IS("\r\n--- %s v%s\r\n"
" * Origin: %s (%d:%d/%d%s)\r\n"
"SEEN-BY: %d/%d\r\n\r\n"),
*more IS("More"),
*ltooslow IS("!Too slow (current=%lu, needed=%u)"),
*quote_format IS("\x16\x08%c\x01" CYAN CLEOL " %s> " GRAY "%s"),
*quotes_misunderstood IS("QUOTES_M"),
*numsign_misunderstood IS("NUM_M"),
*files_poo IS("%s$FILES%02x.POO"),
*files_bak IS("FILES.BAK"),
*user_poo IS("$$$USER.POO"),
*user_bak IS("USER.BAK"),
*password IS("Password: "),
*mem_nmsga IS("!MEM:nmsga"),
*mem_ndir IS("!MEM:ndir"),
*mem_nmsgb IS("!MEM:nmsgb"),
*mem_nubuf IS("!MEM:nubuf"),
*mem_nrmb IS("!MEM:nrmb"),
*zero IS("0"),
*one IS("1"),
*scanfile_name IS("SCANFILE.DAT"),
*c123 IS("\x01\x02\x03"),
*areadoesntexist IS(WHITE "\nThat area doesn't exist!\n"),
*hurling IS("Hurling %s to %s...\n"),
*done IS("Done!\n"),
*tnx4ul IS(WHITE "\nThanks for the upload, %s.\n"),
*lastuser_bbs IS("%sLASTUSER.BBS"),
*lastusxx_bbs IS("%sLASTUS%02x.BBS"),
*restarxx_bbs IS("%sRESTAR%02x.BBS"),
/* *active_bbs IS("%sACTIVE.BBS"), */
*activexx_bbs IS("%sACTIVE%02X.BBS"),
*active_star IS("%sACTIVE*.BBS"),
*so_and_so_calling IS("+%s calling (U#=%d)"),
*press_enter IS("Press ENTER to continue "),
*unavailable IS(WHITE "Sorry, that option is not available at the present time.\n"),
*blank_str IS(""),
*denied_access IS(":DENIED ACCESS: %sarea %s %s"),
*e_save IS(" Save "),
*e_quit IS(" Quit "),
*select_p IS("Select: "),
*colon IS(":"),
*dot IS("."),
*slash IS("/"),
*ps_lastread IS("%sLASTREAD.BBS"),
*ps_lastread_single IS("%sLASTREAD"),
*userdoesntexist IS("That user doesn't exist!"),
*ck_for_help IS(YELONBLUE "Press Control-N for help."),
*magnEt IS("MaxEd"),
*d_msg IS("%d.MSG"),
*sd_msg IS("%s%d.MSG"),
*ss IS("%s%s"),
*l_invalid_pwd IS(" INVALID PASSWORD"),
*invalid_pwd IS(BLINK "\n\aINVALID PASSWORD\a\n" CYAN),
*time_added_for_ul IS(LGREEN "\n%ld:%02ld" YELLOW " minutes added for upload.\n\n"),
*yes IS("YES"),
*no IS("NO"),
*s_ansi IS("ANSI"),
*s_avatar IS("AVATAR"),
*s_tty IS("TTY"),
/* *restartxx_bbs IS("%sRESTAR%02x.BBS"),
*restart_bbs IS("%sRESTART.BBS"), */
*external_prog IS("#External program: `%s'"),
*return_prog IS(":Return from: `%s' (%d)"),
*goto_str IS("\x16\x08%c%c"),
*msg_intl IS("\x01INTL %d:%d/%d %d:%d/%d\r"),
*msg_fmpt IS("\x01""FMPT %d\r"),
*msg_topt IS("\x01TOPT %d\r"),
*enter_city IS("Please enter your City and State/Prov.: "),
*enter_phone IS("Please enter your phone number [(xxx)yyy-zzzz]: "),
*enter_name IS("Please enter your real name: "),
*msg_aborted IS(CLS WHITE CLEOL "\n" CLEOL "\n" CLEOL "Message aborted.\n" CLEOL "\n" CLEOL),
*node_listing IS(" %5d," CYAN " %s, %s\n"),
*pad_zone IS(YELLOW "ZONE "),
*pad_region IS(YELLOW "REGION"),
*pad_net IS(YELLOW "NET "),
*pad_none IS(YELLOW " "),
*msgtemp_name IS("%sMSGTMP%02x.$$$"),
*white_n IS(WHITE "\n"),
*ordinal_th IS("th"),
*ordinal_st IS("st"),
*ordinal_nd IS("nd"),
*ordinal_rd IS("rd"),
*file_name IS(LGREEN "\nFile area " LMAGENTA "%2s" GRAY " ... " CYAN "%s\n\n"),
*message_name IS(LGREEN "%sarea " LMAGENTA "%2s" GRAY " ... " CYAN "%s\n"),
*area_name IS(LMAGENTA "%2s" GRAY " ... " CYAN "%s\n"),
*space_over IS(CLEOL " \r"),
*bbs_stats IS("%sBBSTAT%02x.BBS"),
*on IS("ON"),
*off IS("OFF"),
*four_blanks IS("────"),
*moreyn_blank IS(" \r"),
*moreynns_blank IS(" \r"),
*Yn IS("Yn"),
*yN IS("yN"),
*Yne IS("Yn="),
*Ynq IS("Yn?"),
*yNq IS("yN?"),
*lzh_type IS("%-15.15s %8lu %8lu %-02.2d.%d%% %02d-%02d-%02.2d %02d:%02d:%02d %s %-8.8s %04X\n"),
*cf_barricade IS("!Can't find barricade file %s"),
*sp_bs IS(" \x08"),
*nomls IS("!No mem for lastread scan"),
*clear_string IS("\x16\x08%c%c\x19 %c"),
*fill_string IS("\x16\x08%c%c\x19%c%c"),
*attr_string IS("\x16\x01%c"),
*pd IS("%d"),
/* *magnus_tid IS("Maximus tid %02xh"), */
/* *unknown_uid IS("Unknown UserID"), */
*dotbbs IS(".BBS"),
*dotgbs IS(".GBS"),
*dotlog IS(".Log"),
*dotctl IS(".Ctl"),
*noaccess IS("NoAccess"),
*all IS("All"),
*active_x_bbs IS("ACTIVE%x.BBS"),
*avt_home IS("\x16\x08\x01\x01"),
*bs_sp_bs IS("\x08 \x08"),
*n_n IS("\n\n"),
*qmark IS("?"),
*p2s IS("%2s"),
*eq IS("="),
*opusxfer_name IS("%sMAXXFER.%03x"),
/**/
*comp_date IS(__DATE__),
*comp_time IS(__TIME__),
*glob_iread,
*offsets IS(NULL), /* Pointer to the .PRM info. Access with PRM(). */
*menuname IS(NULL), /* Pointer to mname[] var in MAX_MENU */
*original_prompt IS(NULL),
*orig_path[LEN(MAX_DRIVES)], /* What directory we started out in */
*orig_path2[LEN(MAX_DRIVES)], /* What directory we started out in, alternate1 */
*orig_path3[LEN(MAX_DRIVES)], /* What directory we started out in, alternate2 */
main_menu[MAX_MENUNAME],
files_bbs[13] IS ("FILES.BBS"),
sfiles[13] IS ("FILES"),
last_name[LEN(MAX_MENUNAME)] IS(""),
last_onexit[LEN(PATHLEN)] IS(""),
orig_disk, /* Disk drive number (0=A, 1=B, etc) we started from */
orig_disk2, /* Disk drive number (0=A, 1=B, etc) we started from, alternate1 */
orig_disk3, /* Disk drive number (0=A, 1=B, etc) we started from, alternate2 */
original_path[PATHLEN], /* The DRIVE/PATH we started from */
prmname[LEN(80)] IS("Max"), /* Name of .PRM file */
searchfor[LEN(BUFLEN)], /* Text to search FILES.BBS for */
log_name[LEN(80)], /* Name of log file */
menupath[LEN(80)], /* Path to the current menu files. *
* Can be mod'ed by barricades. */
fix_menupath[LEN(MAX_MENUNAME)], /* Name to adjust menupath back to */
firstname[LEN(36)], /* User's first name. */
next_ldate[LEN(19)], /* Ldate to insert into usr when caller logs off */
last_readln[MAXLEN+1],
linebuf[LEN(BUFLEN+1)]; /* Line input buffer, for stacked cmds */
extrn char local, /* If we're in local mode, implies keyboard & snoop */
displaymode, /* Local display mode, FOSSIL, BIOS, IBM, etc. */
snoop, /* If we see what's on the screen. */
keyboard, /* If we can type. Implies snoop. */
task_num, /* What our task number is */
caller_online, /* If there's a caller currently on-line */
do_timecheck, /* If we check the user's time */
fossil_initd, /* If the FOSSIl has been started */
curattr IS(DEFAULT_ATTR), /* Current local screen attribute */
mdm_attr IS(DEFAULT_ATTR), /* Current remote's screen attribute */
lastmenu, /* The last ^OR response */
realgoto, /* If we don't do the HOTFLASH +1 offset */
protocol_letter, /* The first letter of the current external protocol */
written_echomail, /* If the user wrote an echomail message */
written_matrix, /* If the user wrote a matrix message */
written_local, /* If the user wrote a local message */
sent_time_5left, /* If we've issued a "5minleft" warn */
sent_time_almostup, /* If we've issued a "t.almostup" warn */
barricade_ok, /* If the barricade pwd has been asked */
wrap, /* If the current line has wrapped */
first_search, /* If this was the first area we serached with the locate command (reset nonstop) */
last_nonstop, /* The last L)ocate nonstop setting */
beginline, /* If we just xmit'd a \r or \n, and are at beginning of FILES.BBS line. */
inmsgarea, /* If we're in a message area, and need to update lastread pointers if a user drops carrier */
infilearea, /* If we're in a file area, and need to restore the current directory */
inmagnet, /* If we're in the MagnEt editor */
multitasker, /* Which M'task we're runniing under */
did_trap, /* If we grabbed the ^c/^break vectors */
restart_system, /* If we're restarting the current user */
erl, /* Errorlevel exited with */
in_file_xfer, /* If we should force logit() calls to be displayed on-screen */
in_mcheck, /* If we're in the mailchecker */
create_userbbs, /* Whether or not to create USER.BBS */
this_logon_bad, /* If user failed the current logon */
inchat, /* If we're currently in chat mode */
locked, /* If the user's priv level is currently locked */
locked2, /* Ditto, for the barricades! */
chatreq, /* If user has requested a chat in this session */
do_useredit, /* Run user-editor at startup */
do_desqsnoop, /* If we run a separate "snoop" window */
fthru_yuhu, /* If a YooHoo has apparently fallen through from the mailer */
shutup, /* If time-limit routines should be shut up */
nowrite_lastuser, /* If we're not to write lastuser.bbs on exit */
ul_no_space, /* If we ran out of space during upload */
dsp_set, /* If the 'displaymode' param has been set (other than by .PRM file) */
mn_dirty, /* If menuname var has changed */
no_zmodem, /* Turn off internal Zmodem protocol */
no_shell, /* Turn off local Alt-J (jump to DOS) commands */
no_piggy, /* No ^kP cmd */
last_maxed, /* If last editor invoked was MaxEd */
topline; /* If we've executed TopLine() and are still "up there" */
extrn int ultoday, /* Kbytes uploaded on this call */
port, /* Actual com port we're using */
nested, /* How many nested .BBS files we're in */
usernum, /* Current user number! */
class, /* Class num. of current user */
matches, /* #of matches when searching FILES.BBS */
menu_lines, /* #of lines menu options take up */
areasfile, /* AREAS.DAT file handle */
last IS(MENU_other), /* Last menu-file displayed */
lockpriv, /* The current user's locked priv level */
lockpriv2, /* Ditto, for the barricades */
lmsg, /* Last-message for Msg_Change() */
keepflag IS(FALSE),
unique_task, /* Find a unique task number? */
menuhelp, /* Virtual help level, inside menu */
last_lastread,
areasidx; /* AREAS.IDX file handle */
extrn unsigned long timestart, /* When Max execution started */
timeon, /* Timestmp whn usr got on systm */
timeoff, /* Timestmp whn usr mst be off sys */
max_time, /* -t parameter */
baud, /* User's current baud rate */
last_bps, /* Transfer rate of last file sent */
input_timeout; /* Timer for caller sleep timeout */
extrn long rst_offset; /* Used with -r and .BBS file */
extrn unsigned int current_baud, /* Current baud, in format */
/* acceptable by mdm_baud call. */
/* Use the normal `baud' if you */
/* need the numeric value. */
steady_baud; /* steady_baud is the baud mask */
/* to lock the COM port at, if */
/* any. */
extrn char display_line, /* # of lines since last More [Y,n] */
display_col, /* Col. of current line since last M[Y,n] */
current_line, /* Actual line of screen we're on */
current_col; /* Actual column of screen we're on */
#endif /* MSC_KLUDGE1 */
#ifndef MSC_KLUDGE2 /*PLF Sun 05-20-1990 23:40:41 */
#include "max_str.h"
#endif
#endif /* __MAXV_H_DEFINED_ */